1. Field of the Invention
The present invention relates to a zero crossing detector and to a method for detecting the zero crossing of a particular pulse in a packet of individual pulses particularly pulses obtained from an ultrasound source.
2. Description of the Prior Art
It is well established that a piezoelectric crystal does not emit a single pulse when energized with a single electrical pulse. Rather, the crystal is caused to oscillate at a characteristic resonant frequency to emit a xe2x80x9cpacketxe2x80x9d that contains a number of different amplitude pulses. The envelope of the emitted packet decays rapidly with time in a generally consistent manner, usually producing a train of six or so cycles. An ultrasound detector which receives the emitted packet will emit an electrical pulse packet as an output that generally mirrors the composition of the detected ultrasound packet.
Flow meters are known in which the transit time of an ultrasonic pulse between an ultrasound generator and an ultrasound receiver is used to determine the velocity (and hence the flow rate) of the fluid through which the pulse was transmitted. Devices, such as those described in PCT Application WO 94/28790 and U.S Pat. No. 5,247,826, improve on this basic methodology by arranging for the transit times of ultrasonic pulses to be measured both upstream and downstream of the fluid flow. These transit times are then supplied to a microprocessor which is set to calculate the fluid flow rate using standard algorithms. As mentioned above, however, the received ultrasonic signal, typically transformed into a proportional electrical signal by the ultrasound receiver, will not contain a single pulse but rather a packet of six or so pulses. Thus small errors in the determination of the flow rate may result if the determination is made using different pulses from within the packet.
It also is well known in the art to include a zero crossing detector in such a flow meter in order to detect the arrival of a pulse. This detector includes an analyzer that operates by looking for a xe2x80x9czeroxe2x80x9d point crossing in which the amplitude of the detected ultrasonic signal, transformed to the proportional electrical signal, goes from xe2x80x9cnegativexe2x80x9d to xe2x80x9cpositivexe2x80x9d (or vice versa), crossing the zero point. Of course, it will be appreciated by those skilled in the art that the zero point need not be a true zero amplitude but rather a level approximately mid-range of an alternating amplitude signal.
When this zero point crossing is found the detector can then supply a trigger signal indicating that a crossing has been detected, which may be used to trigger stopping of a timer. In this way known flow meters generate a transit time of an ultrasonic pulse. Since there will usually be several zero crossing points in any pulse packet, a pre-trigger unit is often also provided within the detector which attempts to prevent any but the same pulse in each pulse packet from initiating the trigger signal. The unit operates in combination with the analyzer so that not until after the pulse packet signal has crossed a previously established threshold amplitude (a so called xe2x80x9cpre-trigger levelxe2x80x9d) will a zero level crossing initiate the output of a trigger signal. This pre-trigger level is usually factory preset or set during an initial calibration of the meter before use in order to establish a xe2x80x9cworking differencexe2x80x9d between the threshold amplitude and the anticipated amplitudes of the electrical pulse packet. Because the pulses in the packet decay rapidly, all but the correct crossing can be discriminated against using this pre-trigger unit provided that the working difference is correctly set.
If the pre-trigger level is set too low it may be possible to register one of several crossing points of the electrical pulse packet as the necessary trigger and if set too high no crossing points may be registered. Establishing a working difference therefore involves arranging for the pre-trigger level to lie between these two extremes at an amplitude which will provide only a single zero-crossing point detection.
Unfortunately measurement errors may still occur even if the working difference was correctly set for one measurement since any changes in the absorption properties of the fluid through which the ultrasonic signal propagates, changes in the fluid flow rate, or changes in the operational characteristics of the ultrasonic generator or receiver with age, may cause the absolute amplitude of the proportional electrical signal pulse packet arriving at the pre-trigger unit to change to a level where it becomes possible to detect one of several crossing points or even no crossings at all.
Similarly, even when only a single pulse is generated within a pulse packet, and that pulse is to be detected and registered using a zero crossing detector, a pre-trigger level may still be used, for example to discriminate against noise or system fluctuations. Here again similar problems may occur if the working difference is incorrectly set.
It is an object of the present invention is to provide a zero crossing detector and a method for detecting a zero crossing within an input electrical pulse packet wherein at least some of the aforementioned problems associated with the setting of the working difference are mitigated.
The above object is achieved in accordance with the principles of the present invention in a zero crossing detector having an analyzer which determines a zero level crossing of a current input electrical pulse packet and which emits a trigger signal, as an output, indicative of this determination, a pre-trigger unit which monitors variations in the amplitude of the current input pulse packet to detect a crossing of a pre-trigger level, and a control unit connected to the pre-trigger unit which compares the amplitude of the pre-trigger level with the amplitude of a signal derived from the current input electrical pulse packet, or a previous input electrical pulse packet, and which automatically controls the amplitudes of the pre-trigger level provided to the pre-trigger unit, so as to maintain a working difference therebetween.
By arranging for the automatic control of the amplitude of the pre-trigger level in a manner to maintain a working difference therebetween, variations in the amplitude of the detected ultrasonic pulse packet which may have caused an improper zero-crossing point detection can be compensated for.
Preferably, the derived signal used by the control unit in the comparison with the pre-trigger level is obtained from the current input electrical pulse packet. This has the advantage that the detector is better able to respond to rapid changes in the amplitude between input signals.
A derived signal obtained from a previous input electric pulse packet may be advantageously used in some circumstances. This is particularly the case in circumstances where the use of the currently input electrical pulse packet would lead to unacceptable delays in the operation of the detector.
Preferably, the pre-trigger level is variable dependent on the maximum amplitude of the electrical pulse packet and is most preferably variable to maintain it at a constant fraction of that maximum amplitude. This makes use of the generally consistent amplitude relationship between pulses in a particular signal packet to more reliably establish a suitable pre-trigger level.
Such a detector as described above may be usefully incorporated into an ultrasonic flow meter of the type generally known in the art which operates by determining the time of flight of an ultrasound pulse between an ultrasound generator and receiver in a manner also generally known in the art.